package com.anis.jpa.medical.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * The persistent class for the radioreport database table.
 * 
 */
@Entity
@Table(name = "radioreport", indexes = { @Index(name = "idradioreport", columnList = "idradioreport", unique = true) })
@NamedQuery(name = "MedicalReport.findAll", query = "SELECT r FROM MedicalReport r")
public class MedicalReport implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.TABLE)
	@Column(unique = true, nullable = false, length = 60)
	private long idradioreport;

	@Lob
	private byte[] reportcontent;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(nullable = false)
	private Date reportdate;

	@Column(length = 45)
	private String reportDescription;

	@Column(nullable = false, length = 45)
	private String reportName;

	@Column(length = 45)
	private String reportType;

	// bi-directional many-to-one association to Patient
	@ManyToOne
	@JoinColumn(name = "idPatient", nullable = false)
	private Patient patient;

	public MedicalReport() {
	}

	public long getIdradioreport() {
		return this.idradioreport;
	}

	public void setIdradioreport(long idradioreport) {
		this.idradioreport = idradioreport;
	}

	public byte[] getReportcontent() {
		return this.reportcontent;
	}

	public void setReportcontent(byte[] reportcontent) {
		this.reportcontent = reportcontent;
	}

	public Date getReportdate() {
		return this.reportdate;
	}

	public void setReportdate(Date reportdate) {
		this.reportdate = reportdate;
	}

	public String getReportDescription() {
		return this.reportDescription;
	}

	public void setReportDescription(String reportDescription) {
		this.reportDescription = reportDescription;
	}

	public String getReportName() {
		return this.reportName;
	}

	public void setReportName(String reportName) {
		this.reportName = reportName;
	}

	public Patient getPatient() {
		return this.patient;
	}

	public void setPatient(Patient patient) {
		this.patient = patient;
	}

	public void setReportType(String reportType) {
		this.reportType = reportType;
	}

	public String getReportType() {
		return this.reportType;
	}

}